//
//  DNPhoneTextField.swift
//  LunalerApp
//
//  Created by 露乐ios on 2018/3/2.
//  Copyright © 2018年 露乐ios. All rights reserved.
//

import UIKit


var DefaultFormatStr : NSString = "***********"
var NumberCount : NSInteger = 0


class DNPhoneTextField: DNBaseTextField {

    /*
    // Only override draw() if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func draw(_ rect: CGRect) {
        // Drawing code
    }
    */
    static func configGlobleFormatStr(formatStr: NSString) {
        DefaultFormatStr = formatStr
        NumberCount = DefaultFormatStr.dnStringByReplacingOccurrencesOfStringwithString(target: " ", replacement: "") as! NSInteger
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        self.setGlobleFormatStr(defaultFormatStr: DefaultFormatStr)
    }
    
    override init(frame: CGRect) {
       super.init(frame: frame)
        self.setGlobleFormatStr(defaultFormatStr: DefaultFormatStr)
    }
    

    required init?(coder aDecoder: NSCoder) {
//        fatalError("init(coder:) has not been implemented")
        super.init(coder: aDecoder)
    }
    
}
